home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: 100435.736@compuserve.com (David A. Mair)
- Newsgroups: comp.lang.c++
- Subject: Re: CListBox-Problem Multisel <->Singlesel
- Date: Thu, 08 Feb 1996 09:41:11 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4fcgfu$4ap@dub-news-svc-5.compuserve.com>
- References: <4faep7$eih@newsbf02.news.aol.com>
- NNTP-Posting-Host: dd55-007.compuserve.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- bmatejek@aol.com (BMatejek) wrote:
-
- >Hi folks!
-
- >I have a big problem -for me. I try to change the ListBox attribute after
- >having created the Dialog with this ListBox and before opening this
- >special dialog.
-
- >Therefor I tried the following terminologie:
-
- > CListDialog Dlg(this); //with member CListBox m_List
- > SetWindowLong(Dlg.m_List.m_hWnd, GWL_STYLE,
- >GetWindowLong(Dlg.m_List.m_hWnd, GWL_STYLE) | LBS_MULTIPLESELE);
- > Dlg.DoModal();
-
- >BUT IT DOESN T WORK!
-
- >In the resource editor I marked the single selection attribute, because I
- >need this dialog for other functions.
-
- >It would be very kind if you could help me.
-
- Well, your a little off topic, this is not a C++ question and you
- should probably re-post on comp.os.ms-windows.programmer.tools.mfc.
-
- However, the answer to your question is documented in a few places.
- Microsoft state in programmer documentation that you cannot change the
- style of a list box from multiple select to single select or vice
- versa. The only solution to this problem is to include two
- identically sized and placed list boxes on the dialog box and make one
- single select and one multiple select. You must then show one and
- hide the other as appropriate. Make sure that you populate both
- appropriately.
-
- Regards
- David.
-
-
-